<?php

namespace support\register;

class CommonRegister implements RegisterContract
{
    public function ifExistsThenLogin($data)
    {
        throw new \Exception('请先实现该方法');
    }

    public function register($data)
    {
        if ($this->isExists($data)) {
            throw new \Exception('该用户已被占用');
        }

        $this->action($data);
    }

    public function isExists($data)
    {
        throw new \Exception('请先实现该方法');
    }

    public function action($data)
    {
        throw new \Exception('请先实现该方法');
    }
}